import {get,post} from '../config/https_method.js'

/**
 * 社团列表
 */
export const getClublist = query => get('/association/club/getClubs',query);
/**
 * 社团
 */
export const getClub = query => get('/association/club/getClubById',query);
/**
 * 申请建立社团
 */
export const addClub = query => post('/association/club/addClub', query);

/**
 * 社团分页列表
 */
export const getClubPageList = data => get('/association/club/getPageClubByStatus',data);

/**
 * 审核社团
 */
export const auditClub = data => post('/association/club/auditClub', data);
/**
 * 更新社团信息
 */
export const updateClub = data => post('/association/club/updateClub', data);

/**
 * 可加入社团分页列表
 */
export const getCanJoinClubPageList = data => get('/association/joinClub/getAllCanJoinClubByStatus',data);

/**
 * 加入社团
 */
export const joinClub = data => get('/association/joinClub/joinClub',data);

/**
 * 可加入社团分页列表
 */
export const getApplyJoinClubPageList = data => get('/association/joinClub/getAllApplyJoinClubByStatus',data);

/**
 * 所有社团列表
 */
export const getAllClubByStatus = data => get('/association/club/getAllClubByStatus',data);

/**
 * 所有社团列表
 */
export const getMyClubListPageList = data => get('/association/joinClub/getAllMyClubByStatus',data);

/**
 * 申请人列表
 */
export const getApplicantPageList = data => get('/association/club/getAllApplicantByStatus',data);

/**
 * 审核申请
 */
export const auditStu = data => get('/association/club/auditStu',data);
/**
 * 所有社团列表
 */
export const getClubManagerPageList = data => get('/association/club/getClubManagerPageList',data);
/**
 * 查看社团成员
 */
export const getClubMember = data => get('/association/club/getClubMember',data);
/**
 * 查看社团创建人
 */
export const getClubManager = data => get('/association/club/getClubManager',data);
/**
 * 指定社长，并退团
 * @param data
 * @returns {Promise | Promise<unknown>}
 */
export const setPreManager = data => get('/association/joinClub/setPreManager',data);
/**
 * 退团
 * @param data
 * @returns {Promise | Promise<unknown>}
 */
export const quitClub = data => get('/association/joinClub/quitClub',data);
